home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpinstall / nsIXPInstallManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  126 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIXPInstallManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIXPInstallManager_h__
  6. #define __gen_nsIXPInstallManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIXPIProgressDialog; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIXPInstallManager */
  21. #define NS_IXPINSTALLMANAGER_IID_STR "566689cb-9926-4bec-a66e-a034e364ad2c"
  22.  
  23. #define NS_IXPINSTALLMANAGER_IID \
  24.   {0x566689cb, 0x9926, 0x4bec, \
  25.     { 0xa6, 0x6e, 0xa0, 0x34, 0xe3, 0x64, 0xad, 0x2c }}
  26.  
  27. /**
  28.  * Interface to XPInstallManager - manages download and install operations.
  29.  */
  30. class NS_NO_VTABLE nsIXPInstallManager : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXPINSTALLMANAGER_IID)
  34.  
  35.   /** 
  36.      * Initiates a download and install operation of the supplied URLs
  37.      * and sends notifications to the supplied listener.
  38.      * @param aURLs     array of XPI urls to download and install
  39.      * @param aURLCount number of XPI urls in aURLs
  40.      * @param aListener a listener to receive status notifications
  41.      */
  42.   /* void initManagerFromChrome ([array, size_is (aURLCount)] in wstring aURLs, in unsigned long aURLCount, in nsIXPIProgressDialog aListener); */
  43.   NS_IMETHOD InitManagerFromChrome(const PRUnichar **aURLs, PRUint32 aURLCount, nsIXPIProgressDialog *aListener) = 0;
  44.  
  45.   /**
  46.      * Initiates a set of downloads and checks the supplied hashes after
  47.      * download. Just like initManagerFromChrome() in all other respects
  48.      * @param aURLs     array of XPI urls to download and install
  49.      * @param aHashes   array of hash strings to validate. The entire array
  50.      *                  or individual hashes can be null to indicate no
  51.      *                  checking. If supplied looks like "type:hash", like
  52.      *                  "md5:3232bc5624041c507db0965324188024".
  53.      *                  Supports the types in nsICryptoHash
  54.      * @param aURLCount number of XPI urls in aURLs and aHashes
  55.      * @param aListener a listener to receive status notifications
  56.      */
  57.   /* void initManagerWithHashes ([array, size_is (aURLCount)] in wstring aURLs, [array, size_is (aURLCount)] in string aHashes, in unsigned long aURLCount, in nsIXPIProgressDialog aListener); */
  58.   NS_IMETHOD InitManagerWithHashes(const PRUnichar **aURLs, const char **aHashes, PRUint32 aURLCount, nsIXPIProgressDialog *aListener) = 0;
  59.  
  60. };
  61.  
  62. /* Use this macro when declaring classes that implement this interface. */
  63. #define NS_DECL_NSIXPINSTALLMANAGER \
  64.   NS_IMETHOD InitManagerFromChrome(const PRUnichar **aURLs, PRUint32 aURLCount, nsIXPIProgressDialog *aListener); \
  65.   NS_IMETHOD InitManagerWithHashes(const PRUnichar **aURLs, const char **aHashes, PRUint32 aURLCount, nsIXPIProgressDialog *aListener); 
  66.  
  67. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  68. #define NS_FORWARD_NSIXPINSTALLMANAGER(_to) \
  69.   NS_IMETHOD InitManagerFromChrome(const PRUnichar **aURLs, PRUint32 aURLCount, nsIXPIProgressDialog *aListener) { return _to InitManagerFromChrome(aURLs, aURLCount, aListener); } \
  70.   NS_IMETHOD InitManagerWithHashes(const PRUnichar **aURLs, const char **aHashes, PRUint32 aURLCount, nsIXPIProgressDialog *aListener) { return _to InitManagerWithHashes(aURLs, aHashes, aURLCount, aListener); } 
  71.  
  72. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  73. #define NS_FORWARD_SAFE_NSIXPINSTALLMANAGER(_to) \
  74.   NS_IMETHOD InitManagerFromChrome(const PRUnichar **aURLs, PRUint32 aURLCount, nsIXPIProgressDialog *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitManagerFromChrome(aURLs, aURLCount, aListener); } \
  75.   NS_IMETHOD InitManagerWithHashes(const PRUnichar **aURLs, const char **aHashes, PRUint32 aURLCount, nsIXPIProgressDialog *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitManagerWithHashes(aURLs, aHashes, aURLCount, aListener); } 
  76.  
  77. #if 0
  78. /* Use the code below as a template for the implementation class for this interface. */
  79.  
  80. /* Header file */
  81. class nsXPInstallManager : public nsIXPInstallManager
  82. {
  83. public:
  84.   NS_DECL_ISUPPORTS
  85.   NS_DECL_NSIXPINSTALLMANAGER
  86.  
  87.   nsXPInstallManager();
  88.  
  89. private:
  90.   ~nsXPInstallManager();
  91.  
  92. protected:
  93.   /* additional members */
  94. };
  95.  
  96. /* Implementation file */
  97. NS_IMPL_ISUPPORTS1(nsXPInstallManager, nsIXPInstallManager)
  98.  
  99. nsXPInstallManager::nsXPInstallManager()
  100. {
  101.   /* member initializers and constructor code */
  102. }
  103.  
  104. nsXPInstallManager::~nsXPInstallManager()
  105. {
  106.   /* destructor code */
  107. }
  108.  
  109. /* void initManagerFromChrome ([array, size_is (aURLCount)] in wstring aURLs, in unsigned long aURLCount, in nsIXPIProgressDialog aListener); */
  110. NS_IMETHODIMP nsXPInstallManager::InitManagerFromChrome(const PRUnichar **aURLs, PRUint32 aURLCount, nsIXPIProgressDialog *aListener)
  111. {
  112.     return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114.  
  115. /* void initManagerWithHashes ([array, size_is (aURLCount)] in wstring aURLs, [array, size_is (aURLCount)] in string aHashes, in unsigned long aURLCount, in nsIXPIProgressDialog aListener); */
  116. NS_IMETHODIMP nsXPInstallManager::InitManagerWithHashes(const PRUnichar **aURLs, const char **aHashes, PRUint32 aURLCount, nsIXPIProgressDialog *aListener)
  117. {
  118.     return NS_ERROR_NOT_IMPLEMENTED;
  119. }
  120.  
  121. /* End of implementation class template. */
  122. #endif
  123.  
  124.  
  125. #endif /* __gen_nsIXPInstallManager_h__ */
  126.